<template>
  <div >
    <div id="back" style="padding-bottom:25px">
      <el-page-header @back="goBack" content="ID查询结果">
      </el-page-header>

    </div>
<!--    <el-input placeholder="Input Disease Name" v-model="params.symbol"  style="width: 200px;margin-right: 10px" clearable></el-input>-->
<!--    <el-button type="primary" style="margin-right: 10px" @click="findBySearch()">Select</el-button>-->

    <!--    <span style="position: relative;right:5px">-->
    <!--      <el-button type="primary" plain>Network Visualization</el-button>-->
    <!--    </span>-->

    <el-table
        :data="tableData"
        height="383"
        border
        tooltip-effect="dark"
        style="width: 100%;margin-top: 2px">
      <el-table-column
          prop="diseaseSymbol"
          label="疾病名称"
          width="120">
      </el-table-column>
      <el-table-column
          prop="gene1"
          label="基因1"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene2"
          label="基因2"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene3"
          label="基因3"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene4"
          label="基因4"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene5"
          label="基因5"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene6"
          label="基因6"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene7"
          label="基因7"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene8"
          label="基因8"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene9"
          label="基因9"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene10"
          label="基因10"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene11"
          label="基因11"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene12"
          label="基因12"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene13"
          label="基因13"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene14"
          label="基因14"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene15"
          label="基因15"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene16"
          label="基因16"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene17"
          label="基因17"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene18"
          label="基因18"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene19"
          label="基因19"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene20"
          label="基因20"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene21"
          label="基因21"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene22"
          label="基因22"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene23"
          label="基因23"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene24"
          label="基因24"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene25"
          label="基因25"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene26"
          label="基因26"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene27"
          label="基因27"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene28"
          label="基因28"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene29"
          label="基因29"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene30"
          label="基因30"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene31"
          label="基因31"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene32"
          label="基因32"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene33"
          label="基因33"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene34"
          label="基因34"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene35"
          label="基因35"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene36"
          label="基因36"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene37"
          label="基因37"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene38"
          label="基因38"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene39"
          label="基因39"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene40"
          label="基因40"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene41"
          label="基因41"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene42"
          label="基因42"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene43"
          label="基因43"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene44"
          label="基因44"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene45"
          label="基因45"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene46"
          label="基因46"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene47"
          label="基因47"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene48"
          label="基因48"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene49"
          label="基因49"
          show-overflow-tooltip>
      </el-table-column>
      <el-table-column
          prop="gene50"
          label="基因50"
          show-overflow-tooltip>
      </el-table-column>
    </el-table>

    <div style="margin-top: 10px">
      <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="params.pageNum"
          :page-sizes="[100, 200, 300, 400]"
          :page-size="params.pageSize"
          layout="total, sizes, prev, pager, next"
          :total="total">
      </el-pagination>
    </div>
  </div>

</template>

<script>
import request from "@/utils/request";
export default {
  data() {
    return {
      params: {
        symbol: '',
        pageNum: 1,
        pageSize: 100
      },
      tableData: [],
      total: 0
    };
  },
  created() {
    this.findBySearch();
  },
  methods: {

    findBySearch(){

      request.get("/geneScore",{
        params: this.params
      }).then(res =>{
        if(res.code === '0'){
          this.tableData=res.data.list;
          console.log(this.tableData);
          this.total=res.data.total;
        }else{
        }
      })
    },
    goBack() {
      window.location.href = "/";
    },
    handleSizeChange(pageSize){
      this.params.pageSize= pageSize;
      this.findBySearch();
    },
    handleCurrentChange(pageNum){
      this.params.pageNum=pageNum;
      this.findBySearch();
    }
  }
}

</script>